﻿namespace _25_C_中string参数的值传递与引用传递
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "C#中string参数的值传递与引用传递";

            string str1 = "1111";
            string str2 = "2222";

            show1(str1);
            show2(ref str2);

            Console.WriteLine(str1);//值传递
            Console.WriteLine(str2);//引用传递

            Console.ReadKey();
        }

        static void show1(string param)
        {
            param = "3333";
        }
        static void show2(ref string param)
        {
            param = "4444";
        }
    }
}
